import { Component ,OnInit} from '@angular/core';

@Component({
  selector: 'app-ftk',
  templateUrl: './ftk.component.html',
  styleUrls: ['./ftk.component.less']
})
export class FTKComponent implements OnInit{
  ngOnInit(): void{
    this.printfFTK()
  }
  // 输出K
  printfFTK(){
    let str:string =""
    let str2:string =""
    let str3:string =""
    for (let i = 0; i <5; i++) {
        if (i ===0 || i === 2) {
          for (let j = 0; j < 5; j++) {
            str = str + "*"
          }
          str = str +"\n"
        }
        else{
          str = str + "*\n"
        }
    }
    console.log(str);
    //输出T
    for (let i = 0; i <5; i++) {
        if (i ===0) {
          for (let j = 0; j < 5; j++) {
            str2 = str2 + "*"
          }
          str2 = str2 + "\n"
        }
        else{
          str2 = str2 + "  *\n"
        }
    }
    console.log(str2);
    // 输出K
    for (let i = 0; i <6; i++) {
        if (i ===0 || i === 5) {
          for (let j = 0; j < 5; j++) {
            if (j===0 || j===4) {
              str3 = str3 + "*"
            }else{
              str3 = str3 +" "
            }
          }
          str3 = str3 +"\n"
        }else if (i ===1 || i === 3){
          for (let j = 0; j < 5; j++) {
            if (j===0 || j===2) {
              str3 = str3 + "*"
            }else{
              str3 = str3 +" "
            }
          }
          str3 = str3 +"\n"
        }else if(i===2){
          for (let j = 0; j < 5; j++) {
            if (j===0 || j===1) {
              str3 = str3 + "*"
            }else{
              str3 = str3 +" "
            }
          }
          str3 = str3 +"\n"
        }else{
          for (let j = 0; j < 5; j++) {
            if (j===0 || j===3) {
              str3 = str3 + "*"
            }else{
              str3 = str3 +" "
            }
          }
          str3 = str3 +"\n"
        }
    }
    console.log(str3);
  }
}
